<!doctype html>
<html>
<?php echo $this->fetch('head.html'); ?>

<body>
<div class="body">
<div class="header" > <a href="<?php echo $this->_var['appshop']; ?>?m=index&a=product"  class="left-btn"><span class="iconfont icon-back"></span></a>
    <div class="title">优惠券管理</div>
    <div class="right-btn" id="showSearch"><a href="<?php echo $this->_var['appshop']; ?>?m=coupon&a=add"><span class="iconfont icon-write"></span></a></div>
  </div>
  
  
  
 <div class="plist"> 
 <?php $_from = $this->_var['data']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
 
 	<div class="item">
    	<div class="g-sd1"><img src="<?php echo images_site($this->_var['c']['imgurl']); ?>" onerror="err_imgurl(this)"></div>
        <div class="g-mn1">
        	<div class="g-mn1c">
            	<div class="title"><?php echo $this->_var['c']['title']; ?> <span class="right pointer"> <?php if ($this->_var['c']['status'] == 1): ?>
           <img src="/static/images/yes.gif" class="ajax_no"  rurl="<?php echo $this->_var['shopadmin']; ?>?m=coupon&a=status&id=<?php echo $this->_var['c']['id']; ?>&status=1" url="<?php echo $this->_var['shopadmin']; ?>?m=coupon&a=status&id=<?php echo $this->_var['c']['id']; ?>&status=0" />
           <?php else: ?>
           <img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo $this->_var['shopadmin']; ?>?m=coupon&a=status&id=<?php echo $this->_var['c']['id']; ?>&status=1" rurl="<?php echo $this->_var['shopadmin']; ?>?m=coupon&a=status&id=<?php echo $this->_var['c']['id']; ?>&status=0" />  
          <?php endif; ?></span></div>
                <div class="row">
                	<span>价格：￥<?php echo $this->_var['c']['money']; ?></span>
                    <span>最低消费：￥<?php echo $this->_var['c']['lower_money']; ?></span>
                    
                </div>
                <div class="row">截止时间：<?php echo date("Y-m-d",$this->_var['c']['end_time']); ?></div>
                <div class="row">
                	<span>
                    	数量：<?php echo $this->_var['c']['amount']; ?>
                    </span>
                    <span>
                    	领取数：<?php echo $this->_var['c']['get_num']; ?>
                    </span>
                    <span>
                    	使用数：<?php echo $this->_var['c']['use_num']; ?>
                    </span>
                    
                </div>
                
                <div class="tool">
                	<a href="<?php echo $this->_var['shopadmin']; ?>?m=coupon&a=add&id=<?php echo $this->_var['c']['id']; ?>">编辑</a> <a href="/index.php?m=coupon&a=show&id=<?php echo $this->_var['c']['id']; ?>" target="_blank">查看</a> <a href="javascript:;" class="delete" url="<?php echo $this->_var['shopadmin']; ?>?m=coupon&a=delete&id=<?php echo $this->_var['c']['id']; ?>">删除</a>
                </div>
            </div>
        </div>
    </div>
   
 
   <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
 
<div><?php echo $this->_var['pagelist']; ?></div>
</div>
</div>
<?php echo $this->fetch('footer.html'); ?>